home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / a7221v1b.zip / ADI7221 / ADICODES.H next >
Text File  |  1992-03-12  |  4KB  |  84 lines

  1. /*
  2.    Module:  adicodes.h
  3.    Date:    3/9/92
  4.    Version: 1.0b
  5.    Author:  Dave Lutz
  6.    Email:   lutz@psych.rochester.edu
  7.    Copyright: 1992 University of Rochester, Psychology Dept.
  8.  
  9.    Disclaimer:  This software is distributed free of charge.  As such, it
  10.                 comes with ABSOLUTELY NO WARRANTY.  The user of the software
  11.                 assumes ALL RISKS associated with its use.
  12.  
  13.                 Your rights to modify and/or distribute this software are
  14.                 outlined in the file ADI7221.DOC.
  15.  
  16.    Purpose: This module provides the code definitions for the ADI format
  17.             output files created by AutoCad.  These codes can be used to
  18.             interpret an ADI file and convert it to a file that can be
  19.             sent directly to a plotting device.
  20.    
  21.    The codes in this file are based on the following chart in AutoCad's
  22.    "Installation and Performance Guide" for IBM's and compatibles.
  23.    (Release 10).
  24.  
  25.    Function      | Code | Type | Argument 1 | Argument 2
  26.    ------------------------------------------------------
  27.    Begin Plot    |  1   |  B   | File Level |
  28.    ------------------------------------------------------
  29.    End Plot      |  2   |  A   |            |
  30.    ------------------------------------------------------
  31.    Move          |  3   |  C   | X coord    | y coord
  32.    ------------------------------------------------------
  33.    Draw          |  4   |  C   | X coord    | y coord
  34.    ------------------------------------------------------
  35.    New Pen       |  5   |  B   | pen number |
  36.    ------------------------------------------------------
  37.    Select Speed  |  6   |  B   | speed code |
  38.    ------------------------------------------------------
  39.    Set Line Type |  7   |  B   | line type  |
  40.    ------------------------------------------------------
  41.    Pen Change    |  8   |  A   |            |
  42.    ------------------------------------------------------
  43.    Abort Plot    |  9   |  A   |            |
  44.    ------------------------------------------------------
  45.  
  46.  
  47.    Command types are as follows:
  48.         Type A : command only
  49.         Type B : command + 1 arg   (0 <= arg <= 127)
  50.         Type B : command + 2 args  (0 <= arg1,arg2 <= 65535)
  51.  
  52.    Note: "New Pen" is a device command causing an automatic pen selection;
  53.    "Pen Change" is meant to induce a pause while the operator manually
  54.    changes the pen in the holder.
  55.    
  56.    In an ASCII file, each command is on a separate line, beginning in column
  57.    zero.  If the command has arguments, they are separated with a comma.
  58.  
  59.    In a BINARY file, the command is written as a single byte.  Type B args
  60.    are also written as a single byte, TYPE C args are written as 16 bits
  61.    in standard 8086 format (least significant byte first (left) then most
  62.    significant byte (right)).  There are no delimeters included in a BINARY
  63.    file.
  64. */
  65.  
  66. #define ADIVERSION 1  /* the version of AutoCad ADI that program expects to
  67.                          convert.
  68.                       */
  69.  
  70.    /* If any of the following codes are changed, check retcodes.h to ensure
  71.       that a conflict with those codes has not been created.
  72.    */
  73.  
  74. #define BEGIN_PLOT 1
  75. #define END_PLOT   2
  76. #define MOVE       3  /* pen up, move */
  77. #define DRAW       4  /* pen down, draw */
  78. #define NEW_PEN    5  /* plotter selects pen */
  79. #define SET_SPEED  6
  80. #define LINE_TYPE  7
  81. #define PEN_CHANGE 8  /* wait for manual pen change */
  82. #define ABORT_PLOT 9  /* only needed for resident ADI driver */
  83.  
  84.